package com.tueye.service.impl.userblog;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.tueye.base.util.BaseService;
import com.tueye.dao.userblog.IWebSiteEmailDao;
import com.tueye.entity.user.User;
import com.tueye.entity.user.WebSiteEmailInfo;
import com.tueye.service.exception.TuEyeServiceException;
import com.tueye.service.userblog.IWebSiteEmailService;

/**
 * 
 * @author hanxiaowei
 *
 */
@Scope("prototype")
@Component("webSiteEmailService")
public class WebSiteEmailServiceImpl extends BaseService implements IWebSiteEmailService {
	@Autowired
	@Qualifier("webSiteEmailDao")
	private IWebSiteEmailDao webSiteEmailDao;
	
	@Override
	public void saveWebSiteEmail(WebSiteEmailInfo webSiteEmail)
			throws TuEyeServiceException {
		this.webSiteEmailDao.saveWebSiteEmail(webSiteEmail);
	}

	@Override
	public User getUserToUsername(String username) throws TuEyeServiceException {
		
		return this.webSiteEmailDao.getUserToUsername(username);
	}

	@Override
	public List getInboxInfo(String userid) throws TuEyeServiceException {
		
		return this.webSiteEmailDao.getInboxInfo(userid);
	}

}
